# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor:
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py3-flask-login
_pkgname=flask-login
pkgver=0.5.0
pkgrel=2
pkgdesc="Flask user session management"
options="!check" # py3-blinker and py3-semantic-version are in testing
url="https://github.com/maxcountryman/flask-login"
arch="noarch"
license="MIT"
depends="
	py3-flask
	"
makedepends="
	py3-setuptools
	"
checkdepends="
	py3-nose
	py3-mock
	py3-semantic-version
	py3-blinker
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/maxcountryman/flask-login/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-flask-login" # Backwards compatibility
provides="py-flask-login=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	nosetests-$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="8ffecd2a512738f81ec3901ad30d356b1d63355268f7cf1b427e463d0a271a4623723255e139bbd0f88845d73fa4aab051418b5f68aef0b4576c30294f6207b3  py3-flask-login-0.5.0.tar.gz"
